-
Notifications
You must be signed in to change notification settings - Fork 185
document linearRegression #1390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/marks/linearRegression.d.ts
Outdated
/** | ||
* 🌶 How is this used? | ||
*/ | ||
reduce?: BinReducer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s from maybeDenseInterval. It’s the same idea as line and area. And it’s why LinearRegressionOptions extends BinOptions. For example for areaY you can specify an interval along x, and then reduce defaults to first to extract the first value in y for the current interval in x.
Edit: Though, perhaps our approach here could use some improvements. Like, perhaps this should be more of a select transform than a bin transform? Because I don’t think this is likely to work for channels that don’t end up getting binned by maybeDenseInterval. It might only appear to work today because we’ve only tested it on simple instantiations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've documented what works. Can you open an issue with what doesn't? (It's not clear to me what's missing here.)
src/marks/linearRegression.d.ts
Outdated
/** | ||
* A channel for the dependent variable **x**. | ||
*/ | ||
x?: ChannelValueSpec; | ||
/** | ||
* A channel for the dependent variable **y**. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these represent the dependent variable, and should probably go into their respective mark (x in linearRegressionX, and y in linearRegressionY)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
76af26c
to
36fe65f
Compare
* document linearRegression * document reduce * move dependent variable documentation to their respective marks; new lines
for #1343
todo